/********************************************************************************
* Project       : No Latency RTSP streaming Project
* Desc          : video 4 linux 2 
* Author        : Seo, SeokWon 
* e-mail        : kueony@gmail.com
* Licence       : See the Copyright
*********************************************************************************/

typedef struct _vll_v4l2_buf
{
	void*	data;
	size_t	length;
} st_v4l2_buf;

typedef struct _vll_v4l2_data
{
	int				fd;
	char			dev_name[128];
	unsigned int	v4l_buf_now_idx;
	st_v4l2_buf*	v4l_buf;
	int				v4l_buf_num;
	int				cap_width;
	int				cap_height;
	int				cap_byteperline;
	int				cap_data_size;
} st_v4l2_data;

extern int	open_v4l2(st_v4l2_data* a_v4l2, char* dev_name, int a_cap_width, int a_cap_height);
extern void	close_v4l2(st_v4l2_data* a_v4l2);
extern int	stop_capturing(st_v4l2_data* a_v4l2);
extern int	start_capturing(st_v4l2_data* a_v4l2);
extern int	get_video_data(st_v4l2_data* a_v4l2, char* a_rgb, char* a_yuv);
